﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Main.Master" AutoEventWireup="true"
    CodeBehind="ArticleDetail.aspx.cs" Inherits="AudioBook.AudioManagement.AudioManage.ArticleDetail" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Src="~/AudioManage/MoveArticlePartUC.ascx" TagName="MoveArticlePart"
    TagPrefix="uc" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainHolder" runat="server">
    <asp:HiddenField ID="hidArticleID" runat="server" />
    <asp:HiddenField ID="hidQualityID" runat="server" />
    <div class="border">
        <div class="padding">
            <div id="toolbar-box">
                <div class="t">
                    <div class="t">
                        <div class="t">
                        </div>
                    </div>
                </div>
                <div class="m">
                    <div class="toolbar-list">
                        <ul>
                            <li class="button"><a href="/audiomanagerment/Home.aspx" class="toolbar"><span class="icon-32-home">
                            </span>Home </a></li>
                            <li class="button">
                                <asp:HyperLink ID="HyperLink1" runat="server" CssClass="toolbar" NavigateUrl="Default.aspx">
                                        <span class="icon-32-cancel"></span>Close
                                </asp:HyperLink>
                            </li>
                             <li class="button">
                                <asp:HyperLink ID="hplEdit" runat="server" CssClass="toolbar" NavigateUrl="Default.aspx">
                                        <span class="icon-32-edit"></span>Edit
                                </asp:HyperLink>
                            </li>
                            <li class="divider"></li>
                            <li class="button">
                                <asp:LinkButton ID="btnRefresh" runat="server" CssClass="toolbar" OnClick="btnRefresh_Click">
                                    <span class="icon-32-refresh"></span>
                                    Refresh</asp:LinkButton>
                            </li>
                        </ul>
                        <div class="clr">
                        </div>
                    </div>
                    <div class="pagetitle icon-48-audio">
                        <h2>
                            <a href="Default.aspx">Audio Management</a>
                            <asp:Label ID="lblArticleName" runat="server" ForeColor="Red"></asp:Label></h2>
                    </div>
                    <div class="clr">
                    </div>
                </div>
                <div class="b">
                    <div class="b">
                        <div class="b">
                        </div>
                    </div>
                </div>
            </div>
            <div>
                <asp:ValidationSummary ID="valSum" runat="server" EnableClientScript="true" />
                <asp:CustomValidator ID="valCommon" runat="server" Text="" Display="None"></asp:CustomValidator>
            </div>
            <div class="clr">
            </div>
            <div id="element-box">
                <div class="t">
                    <div class="t">
                        <div class="t">
                        </div>
                    </div>
                </div>
                <div class="m">
                    <table border="0" cellpadding="0" cellspacing="2" width="100%">
                        <col width="30%" />
                        <col />
                        <tr valign="top">
                            <td>
                                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                    <ContentTemplate>
                                        <div class="gridTitle">
                                            Article in the categories
                                        </div>
                                        <asp:Panel runat="server" Width="100%" Height="500" ScrollBars="Vertical">
                                            <asp:DataGrid ID="gridCategory" runat="server" BorderWidth="1" Width="100%" CssClass="grid"
                                                AutoGenerateColumns="false" OnItemDataBound="gridCategory_ItemDataBound" OnItemCommand="gridCategory_ItemCommand">
                                                <HeaderStyle CssClass="gridHeader" />
                                                <ItemStyle CssClass="gridRow0" />
                                                <AlternatingItemStyle CssClass="gridRow1" />
                                                <Columns>
                                                    <asp:TemplateColumn HeaderText="#" HeaderStyle-Width="12" ItemStyle-HorizontalAlign="Right">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblOrder" runat="server"></asp:Label>
                                                            <asp:HiddenField ID="hidCategoryID" runat="server" />
                                                            <asp:HiddenField ID="hidArticleID" runat="server" />
                                                            <asp:HiddenField ID="hidCategoryArticleID" runat="server" />
                                                        </ItemTemplate>
                                                    </asp:TemplateColumn>
                                                    <asp:TemplateColumn HeaderStyle-Width="10">
                                                        <HeaderTemplate>
                                                            <asp:CheckBox ID="CheckBox2" runat="server" onclick="selectAllCheckbox(this,'gridCategory_SELECTED')" />
                                                        </HeaderTemplate>
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chkSelected" runat="server" name="gridCategory_SELECTED" />
                                                        </ItemTemplate>
                                                    </asp:TemplateColumn>
                                                    <asp:TemplateColumn HeaderText="Name">
                                                        <ItemTemplate>
                                                            <asp:HyperLink ID="hplName" runat="server"></asp:HyperLink>
                                                        </ItemTemplate>
                                                    </asp:TemplateColumn>
                                                    <asp:TemplateColumn HeaderText="Mapped" HeaderStyle-Width="80" ItemStyle-HorizontalAlign="Center">
                                                        <ItemTemplate>
                                                            <asp:ImageButton ID="btnActive" runat="server" BackColor="Transparent" />
                                                        </ItemTemplate>
                                                    </asp:TemplateColumn>
                                                    <asp:TemplateColumn HeaderText="ID" HeaderStyle-Width="30" ItemStyle-HorizontalAlign="Right">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblCategoryArticleID" runat="server"></asp:Label>
                                                        </ItemTemplate>
                                                    </asp:TemplateColumn>
                                                </Columns>
                                            </asp:DataGrid>
                                        </asp:Panel>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                            <td>
                                <table width="100%" border="0" cellpadding="0" cellspacing="0" class="gridTitle">
                                    <tr>
                                        <td>
                                            LIST OF ARTICLE PART
                                        </td>
                                        <td align="right">
                                            <asp:ImageButton ID="btnSaveArticlePart" runat="server" ImageUrl="~/images/grid/save.png"
                                                ToolTip="Save the change of list article parts" BackColor="Transparent" OnClick="btnSaveArticlePart_Click"
                                                Width="20" OnClientClick="return confirm('Are you sure you want to save your changed?');" />
                                            &nbsp;
                                            <asp:ImageButton ID="btnDelete" runat="server" ImageUrl="~/images/grid/delete.png"
                                                ToolTip="Delete the selected article parts" BackColor="Transparent" OnClick="btnDelete_Click"
                                                Width="20" OnClientClick="return confirm('Are you sure you want to delete selected article part?');" />
                                            &nbsp;
                                            <asp:ImageButton ID="btnMove" runat="server" ImageUrl="~/images/grid/move.png" ToolTip="Move the selected article parts"
                                                BackColor="Transparent" Width="20" />
                                        </td>
                                    </tr>
                                </table>
                                <asp:Panel runat="server" Width="100%" Height="500" ScrollBars="Vertical">
                                    <asp:DataGrid ID="gridArticlePart" runat="server" AllowPaging="false" BorderWidth="1"
                                        Width="100%" CssClass="grid" AutoGenerateColumns="false" OnItemDataBound="gridArticlePart_ItemDataBound"
                                        OnItemCommand="gridArticlePart_ItemCommand" ShowFooter="true">
                                        <HeaderStyle CssClass="gridHeader" />
                                        <FooterStyle CssClass="gridFooter" />
                                        <ItemStyle CssClass="gridRow0" />
                                        <AlternatingItemStyle CssClass="gridRow1" />
                                        <PagerStyle Mode="NumericPages" Position="Bottom" PageButtonCount="10" CssClass="gridPager" />
                                        <Columns>
                                            <asp:TemplateColumn HeaderText="#" HeaderStyle-Width="12" ItemStyle-HorizontalAlign="Right">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblOrder" runat="server"></asp:Label>
                                                    <asp:HiddenField ID="hidArticlePartID" runat="server" />
                                                    <asp:HiddenField ID="hidPartName" runat="server" />
                                                    <asp:HiddenField ID="hidSortOrder" runat="server" />
                                                    <asp:HiddenField ID="hidPrice" runat="server" />
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderStyle-Width="10">
                                                <HeaderTemplate>
                                                    <asp:CheckBox ID="CheckBox1" runat="server" onclick="selectAllCheckbox(this,'SELECTED')" />
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="chkSelected" runat="server" name="SELECTED" />
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="Name">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtName" runat="server" Width="99%" CssClass="grid-textbox"></asp:TextBox>
                                                </ItemTemplate>
                                                <FooterTemplate>
                                                    <table width="100%" border="0" cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td align="right">
                                                                <b>Part name</b>
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtPartName" runat="server" Width="99%"></asp:TextBox>
                                                            </td>
                                                            <td align="right">
                                                                <b>Audio file (.mp3)</b>
                                                            </td>
                                                            <td>
                                                                <asp:TextBox ID="txtAudioFile" runat="server" Width="99%"></asp:TextBox>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </FooterTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="Order" HeaderStyle-Width="40">
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtSortOrder" runat="server" Width="95%" CssClass="grid-textbox"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtSortOrder"
                                                        ErrorMessage="SortOrder invalid" Display="None"></asp:RequiredFieldValidator>
                                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtSortOrder"
                                                        ValidationExpression="\d+" ErrorMessage="SortOrder invalid." Display="None"></asp:RegularExpressionValidator>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="Size" HeaderStyle-Width="80" ItemStyle-HorizontalAlign="Right">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblSize" runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="Duration" HeaderStyle-Width="60" ItemStyle-HorizontalAlign="Right">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblDuration" runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="Parts" HeaderStyle-Width="40" ItemStyle-HorizontalAlign="Right">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblPartCounter" runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="Created" HeaderStyle-Width="100" ItemStyle-HorizontalAlign="Right">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblCreatedDateTime" runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="ID" HeaderStyle-Width="30" ItemStyle-HorizontalAlign="Right">
                                                <ItemTemplate>
                                                    <asp:Label ID="lblArticlePartID" runat="server"></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                            <asp:TemplateColumn HeaderText="Funtion" HeaderStyle-Width="40" ItemStyle-HorizontalAlign="Center"
                                                FooterStyle-HorizontalAlign="Center">
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="btnPlay" runat="server" ImageUrl="~/images/grid/play.png" />
                                                    </asp:HyperLink>
                                                </ItemTemplate>
                                                <FooterTemplate>
                                                    <asp:ImageButton ID="btnNewPart" runat="server" ImageUrl="~/images/grid/new.png"
                                                        Width="20" BackColor="Transparent" />
                                                </FooterTemplate>
                                            </asp:TemplateColumn>
                                        </Columns>
                                    </asp:DataGrid>
                                </asp:Panel>
                                <%-- Popup to move article part - BEGIN --%>
                                <asp:Panel ID="panelMove" runat="server">
                                    <uc:MoveArticlePart ID="MoveArticlePart1" runat="server"></uc:MoveArticlePart>
                                </asp:Panel>
                                <asp:ModalPopupExtender ID="popupAddProject" runat="server" PopupControlID="panelMove"
                                    TargetControlID="btnMove" RepositionMode="RepositionOnWindowScroll" BackgroundCssClass="modalBackground"
                                    CancelControlID="btnClose">
                                </asp:ModalPopupExtender>
                                <%-- Popup to move article part - END --%>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="b">
                    <div class="b">
                        <div class="b">
                        </div>
                    </div>
                </div>
            </div>
            <noscript>
                Warning! JavaScript must be enabled for proper operation of the Administrator backend.
            </noscript>
            <div class="clr">
            </div>
        </div>
        <div class="clr">
        </div>
    </div>
</asp:Content>
